<?php include_once './application/views/sys_admin/common/header.php';  ?>
<div class=" definewidth m20">
	<form  method="post" id="scrollpicForm" name="scrollpicForm" enctype="multipart/form-data">
	<font color="red"><?php echo @validation_errors(); ?></font>
		<table class="table table-bordered table-hover m10">
			<tr>
		        <td class="tableleft"> 图片地址</td>
		        <td> <input type="file" name="thumbnail" id="thumbnail" /></td>
		    </tr>
		    <tr>
		        <td class="tableleft">图片链接 </td>
		        <td><input type="text" name="url" id="url" size="50"  value="<?php echo @set_value('url');?>" /></td>
		    </tr>
		    <tr>
		        <td class="tableleft"> 图片说明</td>
		        <td> <input type="text" name="title" id="title" size="50" value="<?php echo @set_value('title');?>" /></td>
		    </tr>
		    <tr>
		        <td class="tableleft"> 排序</td>
		        <td><input type="text" name="forder" id="forder" value="<?php echo @set_value('forder')?set_value('forder'):0;?>" /> </td>
		    </tr>
		    <tr>
		        <td class="tableleft"> </td>
		        <td><button type="button" class="btn btn-success"  onclick="adSubmit();" >提交</button></td>
		    </tr>
		</table>
	</form>
</div>
<script type="text/javascript">
function adSubmit(){
	var options = {
		url : '/sys_admin/scrollpic/add/',
		dataType: "json",
		type:"post",
		success : function(ret) {
			if(ret.msg=='1'){
				alert("操作成功");
				window.location.href ='/sys_admin/scrollpic/zhs_scrollpiclist';
			}else{
				alert(ret.msg);
			}
			
		}
	};
	$("#scrollpicForm").ajaxSubmit(options);
	return false;
}
</script>
<div id="dialog" title="系统提示" style="display:none"><p id="msg" style="text-align:center"></p></div>
